package com.wangshang.general.commodity.po;

/**
 * AbstractSpecialCommdityId entity provides the base persistence definition of
 * the SpecialCommdityId entity.
 * 
 * @author MyEclipse Persistence Tools
 */

public abstract class AbstractSpecialCommdityId implements java.io.Serializable {

	// Fields

	private String commoditiesMainId;
	private Long placeId;

	// Constructors

	/** default constructor */
	public AbstractSpecialCommdityId() {
	}

	/** full constructor */
	public AbstractSpecialCommdityId(String commoditiesMainId, Long placeId) {
		this.commoditiesMainId = commoditiesMainId;
		this.placeId = placeId;
	}

	// Property accessors

	public String getCommoditiesMainId() {
		return this.commoditiesMainId;
	}

	public void setCommoditiesMainId(String commoditiesMainId) {
		this.commoditiesMainId = commoditiesMainId;
	}

	public Long getPlaceId() {
		return this.placeId;
	}

	public void setPlaceId(Long placeId) {
		this.placeId = placeId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof AbstractSpecialCommdityId))
			return false;
		AbstractSpecialCommdityId castOther = (AbstractSpecialCommdityId) other;

		return ((this.getCommoditiesMainId() == castOther
				.getCommoditiesMainId()) || (this.getCommoditiesMainId() != null
				&& castOther.getCommoditiesMainId() != null && this
				.getCommoditiesMainId()
				.equals(castOther.getCommoditiesMainId())))
				&& ((this.getPlaceId() == castOther.getPlaceId()) || (this
						.getPlaceId() != null
						&& castOther.getPlaceId() != null && this.getPlaceId()
						.equals(castOther.getPlaceId())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getCommoditiesMainId() == null ? 0 : this
						.getCommoditiesMainId().hashCode());
		result = 37 * result
				+ (getPlaceId() == null ? 0 : this.getPlaceId().hashCode());
		return result;
	}

}